<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<meta charset="utf-8">
<title>图书管理--借阅管理</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="shortcut icon" href="${site.logo}">
<link rel="stylesheet" th:href="@{/static/layui/css/layui.css}" media="all"/>
<link rel="stylesheet" th:href="@{/static/admin/css/list.css}" media="all"/>
</head>
<body class="childrenBody">
<fieldset class="layui-elem-field">
    <legend>借阅记录</legend>
    <div class="layui-field-box">
        <form class="layui-form">
            <div class="layui-inline" style="width: 15%">
                <input type="text" value="" name="bookName" placeholder="输入图书名称" class="layui-input search_input">
            </div>
            <div class="layui-inline" style="width: 15%">
                <input type="text" value="" name="bookCode" placeholder="输入图书编码" class="layui-input search_input">
            </div>
            <div class="layui-inline">
                <a class="layui-btn " lay-submit="" lay-filter="searchForm">查询</a>
            </div>
            <div class="layui-inline">
                <a class="layui-btn layui-btn-normal" data-type="borrowBook">图书借阅</a>
            </div>
        </form>
    </div>
</fieldset>
<div class="layui-form borrow_list">
    <table class="layui-table" id="borrowTable" lay-filter="borrowList"></table>
    <script type="text/html" id="borrowState">
        {{#  if(d.borrowState == 1){ }}
        <span class="layui-badge layui-bg-green">待审核</span>
        {{#  } else if(d.borrowState == 2){ }}
        <span class="layui-badge layui-bg-success">审核通过</span>
        {{#  } else { }}
        <span class="layui-badge layui-bg-warm">审核拒绝</span>
        {{#  } }}
    </script>

    <script type="text/html" id="borrowBar">
        {{#  if(d.borrowState == 1){ }}
        <a class="layui-btn layui-btn-green layui-btn-xs" lay-event="checkBorrow">审核</a>
        {{#  } }}

        {{#  if(d.borrowState==2&&d.revertState == 1){ }}
        <a class="layui-btn layui-btn-green layui-btn-xs" lay-event="revertBorrow">归还</a>
        {{#  } }}
    </script>

    <script type="text/html" id="revertState">
        {{#  if(d.revertState == 1){ }}
        <span class="layui-badge layui-bg-green">待归还</span>
        {{#  } else if(d.revertState == 2){ }}
        <span class="layui-badge layui-bg-success">已归还</span>
        {{#  } }}

    </script>


</div>
<div id="page"></div>
<script type="text/javascript" th:src="@{/static/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/static/admin/js/tools.js}"></script>
<script type="text/javascript" th:src="@{/static/bookBorrow/list.js}"></script>
</body>
</html>